From 8c8f7f83ba73d5dcc19a1dc5768d70d50a620d54 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 16 Nov 2010 19:23:15 +0100 Subject: [PATCH] open-with: add gtk_open_with_dialog_get_mode() --- gtk/gtkopenwithdialog.c | 19 ++++++++++++++++++- gtk/gtkopenwithdialog.h | 2 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gtk/gtkopenwithdialog.c b/gtk/gtkopenwithdialog.c index b096fdf935..065b189dd6 100644 --- a/gtk/gtkopenwithdialog.c +++ b/gtk/gtkopenwithdialog.c @@ -1384,7 +1384,7 @@ gtk_open_with_dialog_set_show_other_applications (GtkOpenWithDialog *self, } gboolean -gtk_open_with_get_show_other_applications (GtkOpenWithDialog *self) +gtk_open_with_dialog_get_show_other_applications (GtkOpenWithDialog *self) { g_return_val_if_fail (GTK_IS_OPEN_WITH_DIALOG (self), FALSE); @@ -1428,3 +1428,20 @@ gtk_open_with_dialog_get_show_set_as_default_button (GtkOpenWithDialog *self) return self->priv->show_set_as_default_button; } +/** + * gtk_open_with_dialog_get_mode: + * @self: a #GtkOpenWithDialog + * + * Returns the current mode of the dialog + * + * Returns: the current mode of the dialog + * + * Since: 3.0 + */ +GtkOpenWithDialogMode +gtk_open_with_dialog_get_mode (GtkOpenWithDialog *self) +{ + g_return_val_if_fail (GTK_IS_OPEN_WITH_DIALOG (self), -1); + + return self->priv->mode; +} diff --git a/gtk/gtkopenwithdialog.h b/gtk/gtkopenwithdialog.h index 6b202c79e5..55c74fad01 100644 --- a/gtk/gtkopenwithdialog.h +++ b/gtk/gtkopenwithdialog.h @@ -86,4 +86,6 @@ gboolean gtk_open_with_get_show_set_as_default_button (GtkOpenWithDialog *self); GAppInfo * gtk_open_with_dialog_get_selected_application (GtkOpenWithDialog *self); +GtkOpenWithDialogMode gtk_open_with_dialog_get_mode (GtkOpenWithDialog *self); + #endif /* __GTK_OPEN_WITH_DIALOG_H__ */ -- 2.30.2